<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
	<title>欢迎页面-康人签到系统管理端</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

 <!-- 新模板 -->
<link rel="shortcut icon" href="<c:url value='/template/new_muban/images/favicon.ico'/>" type="image/x-icon"/>

<!-- 最新导入 -->
<script type="text/javascript" src="<c:url value='/template/new_muban/js/jquery-min-1.7.js'/>"></script>
<link rel="stylesheet" href="<c:url value='/template/new_muban/css/font.css'/>">
<link rel="stylesheet" href="<c:url value='/template/new_muban/css/xadmin.css'/>">   
<script src="<c:url value='/template/new_muban/lib/layui/layui.js'/>" charset="utf-8"></script> 
<script type="text/javascript" src="<c:url value='/template/new_muban/js/xadmin.js'/>"></script>

<!-- 页面自动刷新 -->
<!--  <meta http-equiv="refresh" content="60">  -->
<!-- 折线图 -->
 <!-- <script type="text/javascript" src="https://echarts.baidu.com/gallery/vendors/echarts/echarts.min.js"></script> -->
 
<script type="text/javascript" src="<c:url value='/template/lead_into/qr/qrcode.js'/>"></script>
 
 <style type="text/css">
	/*圆形头像  */
	/* #divcss5{ margin:10px auto}  */
	#divcss5 img{ border-radius:50%} 
	
	/* 数据字体 */
	.x-admin-backlog-body p cite {
	    font-style: normal;
	    font-size: 30px;
	  /*   font-weight: 300; */
	    color: rgb(0, 150, 136);
	}
/* 	 	#qrcode {
width:80px;
  height:80px;
  margin-top:15px;
}   */ 
</style>
</head>
<body>
<!-- 动画https://www.layui.com/doc/element/anim.html -->
<!-- 其中 layui-anim 是必须的，后面跟着的即是不同的动画类
<div class="layui-anim layui-anim-up"></div> -->
<!-- 循环动画，追加：layui-anim-loop
<div class="layui-anim layui-anim-up layui-anim-loop"></div> layui-anim-fadein   layui-anim-upbit-->
  <div class="x-body layui-anim layui-anim-fadein">
        <blockquote class="layui-elem-quote">欢迎管理员：
            <span class="x-red">${root_name}</span>&nbsp;&nbsp;&nbsp;当前时间:<span id="Time">当前时间:2018-04-25 20:50:53</span></blockquote>
         <fieldset class="layui-elem-field">
            <legend>数据统计</legend>
            <div class="layui-field-box">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-carousel x-admin-carousel x-admin-backlog" lay-anim="" lay-indicator="inside" lay-arrow="none" style="width: 100%; height: 85px;">
                                <div carousel-item="">
                                    <ul class="layui-row layui-col-space10 layui-this">
                                     
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>用户统计</h3>
                                                <p><cite id="user_count">加载中...</cite></p>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs2">
                                            <a href="javascript:;" class="x-admin-backlog-body">
                                                <h3>已签到</h3>
                                                <p><cite id="yhx_count">加载中...</cite></p>
                                            </a>
                                        </li>
                                        
                                    </ul>
                                   
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset> 
    
        <%-- <fieldset class="layui-elem-field">
            <legend>系统通知</legend>
            <div class="layui-field-box">
                <table class="layui-table" lay-skin="line">
                    <tbody>
	                    <c:forEach items="${allPayPush}" var="payPush" begin="0" end="4">
	                    	 <tr>
	                            <td >
	                                <a class="x-a" href="#" target="_blank">
	                                	<div id="divcss5"> 
	                                		微信用户 : <img width="35px" src="${payPush.headimg}">  ${payPush.nickname} 付费开通了会员 ! （ ${payPush.s_name}  ） 时间 : <fmt:formatDate pattern="yyy-MM-dd HH:mm:ss" value="${payPush.time}"/>
	                               		</div>
	                                </a>
	                            </td>
	                        </tr>
	                    </c:forEach>
                        <!-- <tr>
                            <td >
                                <a class="x-a" href="/" target="_blank">新版x-admin 2.0上线了</a>
                            </td>
                        </tr> -->
                    </tbody>
                </table>
            </div>
        </fieldset> --%>
       <%--  <fieldset class="layui-elem-field">
        	<input type="hidden" id="o_7" value="${questCount.allQuest_7}"/>
        	<input type="hidden" id="o_6" value="${questCount.allQuest_6}"/>
        	<input type="hidden" id="o_5" value="${questCount.allQuest_5}"/>
        	<input type="hidden" id="o_4" value="${questCount.allQuest_4}"/>
        	<input type="hidden" id="o_3" value="${questCount.allQuest_3}"/>
        	<input type="hidden" id="o_2" value="${questCount.allQuest_2}"/>
        	<input type="hidden" id="o_1" value="${questCount.allQuest_1}"/>
        	<input type="hidden" id="o_now" value="${today_quest_count}"/>
        	  
            
            <legend>系统信息：总访问量 / 门店访问量</legend>
            <div class="layui-field-box" style="width: 100%; height: 360px;">
             <div id="container" style="height: 100%;width:50%;float: left;" >
             
             </div>
             <div id="right-container" style="height: 100%;width:50%;float: left;" >
             	</div>
           
       
            </div>
        </fieldset> --%>
     <!--    <fieldset class="layui-elem-field">
       
            <legend>系统信息：门店访问量</legend>
            <div class="layui-field-box" style="width: 100%; height: 360px;">
             	<div id="right-container" style="height: 100%" >
             	</div>
           
            </div>
        </fieldset> -->
        
   <%--    <fieldset class="layui-elem-field">
       
            <legend>平台二维码</legend>
            <div class="layui-field-box" style="width: 100%; height: 180px;">
             	 <center>
	             	 <div id="qrcode"><img width=150 height=150 alt="谭小农" src="https://nc.cdn.gengduoke.com//ueditor/jsp/upload/image/20200607/1591540212963080390.jpg"></div>
             	 </center>
            </div>
        </fieldset>   --%>

        <fieldset class="layui-elem-field">
            <legend>技术支持</legend>
            <div class="layui-field-box">
                <table class="layui-table">
                    <tbody>
                        <tr>
                            <th>更多客科技</th>
                            <td>-<!-- <a href="http://menchuangtop.com/" class='x-a' target="_blank">访问官网</a> --></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </fieldset>
        <!-- <blockquote class="layui-elem-quote layui-quote-nm">汝未来看此花时，汝花于汝心同归于寂，汝来看此花此花颜色一时明白起来。     ——王阳明《传习录》 </blockquote> -->
    </div>
      
        
    </body>
    <script type="text/javascript">
    //实时时间
    $(function () {
        CurrentTime();
        
        
       getCenterData();
        
        
    })
    function CurrentTime() {
        var date = new Date();
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        var hour = date.getHours();
        var minute = date.getMinutes();
        var second = date.getSeconds();
        month = month < 10 ? ("0" + month) : month;
        day = day < 10 ? ("0" + day) : day;
        hour = hour < 10 ? ("0" + hour) : hour;
        minute = minute < 10 ? ("0" + minute) : minute;
        second = second < 10 ? ("0" + second) : second;
        var Timer = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
        //在页面上插入日期
        $("#Time").html(Timer);
        setTimeout(function () {
            CurrentTime();
        }, 1000);
    }

    
    </script>
<script type="text/javascript">
//获取日期
function GetDateStr(AddDayCount) {
	var dd = new Date();
	dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期
	var y = dd.getFullYear();
	var m = dd.getMonth()+1;//获取当前月份的日期
	var d = dd.getDate();
	return y+"-"+m+"-"+d;
}

/* function getQueryVariable(variable)
{
       var query = window.location.search.substring(1);
       var vars = query.split("&");
       for (var i=0;i<vars.length;i++) {
               var pair = vars[i].split("=");
               if(pair[0] == variable){return pair[1];}
       }
       return(false);
}
    var supply_id = "https://jukou.laidedui.com/jkapi?id=shop_"+"${root.supply_id}"; */
    
/* new QRCode(document.getElementById("qrcode"), supply_id);  // 设置要生成二维码的链接
 */
/* var qrcode = new QRCode(document.getElementById("qrcode"), {
    text: supply_id,
    width: 150,
    height: 150,
    colorDark : "#000000",
    colorLight : "#ffffff",
    correctLevel : QRCode.CorrectLevel.H
}); */
</script>

<script type="text/javascript">

function getCenterData() {
	 $.ajax({
           type: 'POST',
			// dataType: 'json',
           url: "<c:url value='/selectUserCount.do'/>",
		     async : true, // 注意此处需要yi步  
		     success: function(data){		
				console.log(data);
				/* console.log(data.allTicketOrderByShopCount);
				console.log(data.allHXTicketByShopCount);
				console.log(data.yhx);
				console.log(data.whx);
				console.log(data.user_count); */
				$("#yhx_count").text(data.yhx_count);
				$("#user_count").text(data.user_count);
				
				
           }
		});


} 


</script>
</html>